package com.hxrk.jni;

import android.graphics.Bitmap;

/**
 * Created by Administrator on 2016/11/15.
 */
public class YuvToRgbNative {
    public native int nativeYuvInit(int camid, int width, int height);

//    public native int yuv420do(int camMIPI_ID, Bitmap bmp, byte[] yuv_data, int yuv_length);
//    public native int yuv420do(int camMIPI_ID, Bitmap bmp, Object yuv_data, int yuv_length);
    public native int nativeYuv420do(int camid, int yuv_data, int yuv_length);

//    public native int yuv422do(int camid, Bitmap bmp, byte[] yuv_data, int yuv_length);
//    public native int yuv422do(int camid, Bitmap bmp, Object yuv_data, int yuv_length);
    public native int nativeYuv422do(int camid, int yuv_data, int yuv_length);
    public native int nativeYuv422dotest(int camid, int yuv_data, int yuv_length);

    public native int nativeGetbitmap(int camid, Bitmap bmp);

    public native int nativeGetbitmap12(Bitmap bmp);

    public native int nativeYuvRelease(int camid);

    public native int nativeGetyuv(int camid, Object yuvdata);
    public native int nativeGetH264(int camid, int vaddr, int size, Object h264Buffer);


    public native int nativeH264do(int camid, int yuv_data, int yuv_length, Object output);
    public native int nativeH264data(byte[] yuv_data, int yuv_length);

    public native int nativeSaveAAC(int aac_data, int size, Object output, byte[] data);

    static {
        System.loadLibrary("YuvToRgb");
    }
}
